<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html >
<html>
<head>
<t:base type="jquery,easyui,tools"></t:base>
</head>
<body style="overflow-y: hidden" scroll="no">
<t:datagrid  pagination="false"  name="groupList" title="教学项目选择" onLoadSuccess="gridLoadOK"
			 actionUrl="dictTeachItemController.do?select" idField="id" 
 			checkbox="true" showRefresh="false"  fit="true"  queryMode="group" >
	<t:dgCol title="common.id" field="id" hidden="true"></t:dgCol>
	<t:dgCol title="实验类型" field="testType.testTypeName" hidden="true"></t:dgCol>
	<t:dgCol title="类别" field="testCategory.categoryName" hidden="true"></t:dgCol>
	<t:dgCol title="实验要求" field="testRequire" hidden="true"></t:dgCol>
	<t:dgCol title="计划学时" field="planHour" hidden="true"></t:dgCol>
	<t:dgCol title="计划组数" field="groupCount" hidden="true"></t:dgCol>
	<t:dgCol title="每组人数" field="averageCount" hidden="true"></t:dgCol>
	<t:dgCol title="项目编号" field="itemNo"  width="250" query="true" ></t:dgCol>
	<t:dgCol title="项目名称" field="itemName"  width="250" query="true" ></t:dgCol>
</t:datagrid>

<script>

	function gridLoadOK(){
		var ids = "${ids}".split(",");
		for(var i=0;i<ids.length;i++){
			$("#groupList").datagrid("selectRecord",ids[i]);
		}
	} 
	
	function getSelectedRow(){
		var rows = $("#groupList").datagrid('getSelections');
		if(rows.length!=1){
			tip("请选择一条记录");
		}
		return rows;
	}
	
	function getSelectIds(){
		return $('#groupList').datagrid("getSelections");
	}
</script>
</body>
</html> 